{% extends "SchoolBuy/base.html" %}
{% block title %}发布商品{% endblock %}
{% block detial %}
<div class="row">

    <div class="col-sm-12">

        <div class="king-block king-block-bordered">

            <div class="king-block-header king-gray-light">

                <h3 class="king-block-title">{% block h1 %}发布物品{% endblock %}</h3>

            </div>

            <div class="king-block-content">

                <form class="form-horizontal" method="POST" enctype="multipart/form-data">
                    {% csrf_token %} 
                    {{ csrf_input }}

                    <div class="form-group">

                        <label for="inputCount3" class="col-sm-3 control-label">标题：</label>

                        <div class="col-sm-7">

                            {{ form.Title }}
                            <p class="help-block">{{ form.Title.errors.as_text }}</p>

                        </div>

                        <span class="text-danger mt5 fl">*</span>

                    </div>

                    <div class="form-group has-feedback">

                        <label class="control-label col-sm-3" for="introduction">详细信息：</label>

                        <div class="col-sm-7">

                            {{ form.Details }}
                            <p class="help-block">{{ form.Details.errors.as_text }}</p>

                        </div>
                        <span class="text-danger mt5 fl">*</span>

                    </div>

                {% block delpicture %}
                    <div class="form-group">
                        <label for="inputCount3" class="col-sm-3 control-label">图片：</label>
                        <div class="col-sm-7 col-sm-offset-3">

                            <div class="demo" id="kendo_upload_demo1">

                                <input name="image" class="file_input" type="file" multiple="multiple"/>
                                <p class="help-block">注意，我们只会接收.jpg和.png图片</p>

                            </div>

                        </div>

                    </div>
                    <br>



                    <div class="form-group">
                        <label for="inputCount3" class="col-sm-3 control-label">验证码：</label>
                        <div class="col-sm-7 col-sm-offset-3">

                            <div class="demo" id="kendo_upload_demo1">
                                <img src="{{ SITE_URL }}create_code" id="code" onclick="javascript:code.src='{{ SITE_URL }}create_code?tm='+Math.random()">
                                <input type="text" name="code" maxlength="4"/>
                                <p class="help-block">{% if code_err %}验证码不对哦{% endif %}</p>
                            </div>

                        </div>

                    </div>

                    {% endblock %}

                    <div class="form-group">

                        <div class="col-sm-7 col-sm-offset-3">

                            <input type="submit" name="submit" class="king-btn king-success mr10" value="提交" />

                            <input type="reset" class="king-btn king-default" value="重置" />

                        </div>

                    </div>

                </form>

            </div>

        </div>

    </div>

</div>
    {% block addend %}{% endblock %}

<script>

$(document).ready(function() {



    $("#kendo_upload_demo1 .file_input").kendoUpload();


});

</script>


{% endblock %}